﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CotrobaieStatistics
{
    /// <summary>
    /// Contine o linie de regresie si rentabilitatea medie pentru un produs pe o perioada data
    /// </summary>
    class Statistics
    {
        private DateTime startDate, endDate;
        private RegressionLine line;
        private double avgRentability;
        /// <summary>
        /// Data de inceput a observatiilor
        /// </summary>
        public DateTime StartDate { get { return startDate; } }
        /// <summary>
        /// Data de start a observatiilor
        /// </summary>
        public DateTime EndDate { get { return endDate; } }
        /// <summary>
        /// O ecuatie de gradul I de forma pret = a*timp+b reprezentand o linie de regresie printre preturile observate
        /// </summary>
        public RegressionLine RegressionLine { get { return line; } }
        /// <summary>
        /// Rentabilitatea medie pe perioada data
        /// Rentabilitatea medie pentru n preturi P1, P2, ... Pn este 
        /// media urmatoarelor numere: P2-P1/P1, P3-P2/P2, ..., Pn-Pn-1/Pn-1
        /// </summary>
        public double AvgRentability { get { return avgRentability; } }

        public Statistics(DateTime start, DateTime end, RegressionLine l, double rent)
        {
            startDate = start;
            endDate = end;
            line = l;
            avgRentability = rent;
        }

    }
}
